Page({
    data: {
        active: 1,
        isDown: 0,
        value: '',
        Diashow: false,
        show: false,
        explainShow:"",
        image: "../../image/user-down.png",
        explainOneShow:"",
        activeNames: ['0'],
        isFold: true,
        drinkData: [
            {
                drinkImg: "../../DrinkServe/images/drinks/arb.png",
                drinkName: "生椰拿铁",
                price: "￥14.5"
            },
            {
                drinkImg: "../../image/1.jpg",
                drinkName: "标准美式",
                price: "￥7"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/hryy.png",
                drinkName: "椰云拿铁",
                price: "￥10"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/lmbc.png",
                drinkName: "丝绒拿铁",
                price: "￥14.5"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/nt.png",
                drinkName: "椰云拿铁",
                price: "￥11.5"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/yjnt.png",
                drinkName: "生椰拿铁",
                price: "￥9.5"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/新鸳鸯红茶拿铁.png",
                drinkName: "丝绒拿铁",
                price: "￥11.5"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/hyhr.png",
                drinkName: "椰云拿铁",
                price: "￥8.5"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/arb.png",
                drinkName: "生椰拿铁",
                price: "￥14.5"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/yzglrnb.png",
                drinkName: "标准美式",
                price: "￥7"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/qklrnb.png",
                drinkName: "椰云拿铁",
                price: "￥10"
            },
            {
                drinkImg: "../../DrinkServe/images/drinks/jtmqd.png",
                drinkName: "丝绒拿铁",
                price: "￥14.5"
            },
        ],
        thirdData: [{
                image: "../../image/cart-third2.png",
                title: "首杯￥10.9"

            },
            {
                image: "../../image/cart-third3.png",
                title: "每期8杯特价"

            },
            {
                image: "../../image/cart-third1.png",
                title: "无限量折扣"

            },

        ],
        explain:[
            {
            text:"*请您在开卡前点开“我的”——“个人资料”——“协议与说明”，仔细阅读《付费会员服务协议》，同意付费会员协议相关内容后再购买本卡。"
            },
            {
                text:"如无特殊说明，本卡相关页面所称“瑞幸自由卡”均为瑞幸自由卡2.0版本。"
            },
            {
                text:"1.用户开通瑞幸自由卡可享首杯立享10.9元(限首次开通)、8杯特价饮品、无限量畅享5.5折、限定新品无限量4.8折会员权益，具体权益内容如下:"
            },
            {
                text:"*本权益将以优惠券的形式发送至用户账户，用户可在“我的”——“优惠券”中查看具体规则并使用。"
            },
            {
                text:"*本权益仅限首次开通瑞幸自由卡用户享有，续费/再次开通无法获得。"
            },
            {
                text:"①首杯立享10.9元"
            },
            {
                text:"*用户开通瑞幸自由卡，可享以专享优惠价格购买8杯指定现制饮品的会员权益。"
            },
            {
                text:"*适用饮品:生椰拿铁/厚乳拿铁/丝绒拿铁/冰厚乳拿铁/冰丝绒拿铁/陨石拿铁/耶加雪菲·美式/耶加雪菲·冰美式/耶加雪菲·拿铁/耶加雪菲·澳瑞白中任意1款。"
            },
        ],
        explainOne:[
            {
                text:"—、购买问题"
            },
            {
                text:"1.购买瑞幸自由卡是否可以开票?"
            },
            {
                text:"购买成功后，用户可在luckin coffee app/微信小程序中/支付宝小程序“我的”———“发票管理”——“付费会员卡开票”，申请开票，开票金额为实际支付金额"
            },
            {
                text:"2.购买瑞幸自由卡后是否可以退款?"
            },
            {
                text:"付费会员属于会员权益，—旦购买即开通，不可退款。"
            },
            {
                text:"3.我购买了30天包月卡后，又购买了自动续费卡，会员权益是否可以叠加?"
            },
            {
                text:"可以叠加，您可以仕”出下权益周期。"
            },
            {
                text:"4.我购买了瑞幸自由卡后，又购买了生椰自由卡，会员权益是否可以叠加?"
            },
            {
                text:"您可以同时拥有多张会员卡，但同一订单内仅可使用一张会员卡权益。"
            },
            {
                text:"5.购买瑞幸自由卡后如何查看自己的权益?"
            },
            {
                text:"您可以登录luckin coffee app/微信小样予/1E击“自由卡”进入付费会员卡详情页，查看自己购买的卡及对应具体权益。"
            },
    ]
    },
    pay(){
        wx.showToast({
          title: '支付成功￥15.9',
        })

    },

    pays(){
        wx.showToast({
          title: '支付成功￥9.9',
        })

    },
    onChange(event) {
        wx.showToast({
          title: `切换到标签 ${event.detail.name}`,
          icon: 'none',
        });
      },
    Down() {
        if (this.data.isDown == 0) {
            this.setData({
                isDown: 1,
                image: "../../image/user-up.png"
            })
        } else {
            this.setData({
                isDown: 0,
                image: "../../image/user-down.png"
            })
        }
    },
    explainShow() {
        this.setData({ explainShow: true });
      },
      explainClose(){
        this.setData({ explainShow: false });
      },
      explainOneShow(){
        this.setData({ explainOneShow: true });
      },
      explainOneClose(){
        this.setData({ explainOneShow: false });
      },
    onClose() {
        this.setData({
            show: false
        })
    },
    showAll: function (e) {
        this.setData({
            isFold: !this.data.isFold,
        })
    },
    onChange(event) {
        this.setData({
            activeNames: event.detail,
        });
    },
    showPopup() {
        this.setData({
            show: true
        });
    },

    goCompare() {
        wx.showToast({
            title: '兑换码无效',
            Diashow:true
        })

    },
    // 开启弹窗
    showDialog() {
        this.setData({
            Diashow: true
        })

    },
    // 关闭弹窗
    CloseInput() {
        this.setData({ Diashow: false });
      },

      goPage(){
          wx.navigateTo({
            url: '/components/cartHome/renewal/renewals',
          })

      },
      goPagePay(){
        wx.switchTab({
            url: '../../pages/goods/goods',
        })

    }

    // onCloseInput() {
    //     var that = this
    //     that.setData({
    //         // Diashow: true,
    //         value: ""
    //     });
    // },

});